package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class SpringMvcApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringMvcApplication.class, args);
	}


	public static class Test {
		@RequestMapping("/t1")
		public int t1(){
			return 1;
		}
	}


	public static class test2 {
		@RequestMapping("/hello")
		public String r(){
			return "hello";
		}
	}
	@RequestMapping("/t2")
	public String t2(String name){
		return "name:"+name;
	}
	@RequestMapping("/age")
	public int age(Integer age){
		return age;
	}
	@RequestMapping("/t3")
	public Object t3(String name,Integer age){
		return name+age;
	}
	@RequestMapping("/t4")
	public Object t4(Student student){
		return student.toString();
	}
}
